package com.xii.eduservice.controller;

import com.xii.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @description: 前端模拟请求   后端配置getway后就不需要了
 *
 * @author  wangxihao
 * @email wangxh0108@163.com
**/
@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin        //解决跨域问题
public class TestController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }


    @GetMapping("info")
    public R info(){
        return R.ok().data("name","admin").data("roles","[admin]").data("avatar","https://img-blog.csdnimg.cn/dd3b1fea736f47f7bb63ac5601842f70.png#pic_center");
    }

}
